home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
COMM
/
BGTLX211.ARJ
/
BGFTUYTL.SLT
< prev
next >
Wrap
Text File
|
1991-05-02
|
5KB
|
104 lines
// BGFTUYTL.SLT: Telix script for BGFT Ymodem Batch upload.
// Support Package for Registered Users of BGFT (TM).
// Copyright 1990-1991 Dirac Systems.
// Telix is a trademark of Exis Inc.
// MANUAL INSTALLATION:
// The following outlines how to install the script for use as an
// external protocol in Telix:
// Be sure that the resident part (BGFT360K.COM or BGFT720K.COM) of
// BGFT is loaded before the communications program. Add /B if
// you want Drive B:. The BGFT status window does not need to be
// active; it need only be resident.
// The batch file BGFTINIT.BAT is used to initialize BGFT prior to
// running Telix. This file must be edited to contain information
// about your modem's port number and baud rate prior to use
// (default is 1200 baud, port 1). You must run the batch file
// BGFTINIT.BAT to make sure that BGFT is set up properly. THIS
// MUST BE DONE before using BGFT as an external protocol under
// Telix. This is true even though the baud and port are set here.
// Put the right sized floppy (.720, 1.2, or 1.44 Megabyte DOS
// formatted, no errors for BGFT720K.COM ; the above or 360K DOS
// formatted, no errors for BGFT360K.COM) into the desired floppy
// drive. The floppy size must correspond to the drive type.
// Compile the BGFTUYTL.SLT by using the Telix compiler, CS, viz.
// CS BGFTUYTL
// This will produce BGFTUYTL.SLC for use in Telix.
// From terminal mode do 'Alt_O' for 'Configure Telix'.
// Choose 'Protocol Options'.
// 'Change which setting?': Choose one of the four external protocol
// options: A, B, C, or D.
// Key: When in the upload operation, pressing this key will choose
// the protocol. The key should not be used elsewhere, eg. X (Xmodem).
// Choose 'F', for example. It will be highlighted for the Telix
// upload operation.
// Protocol name: This is what will show up in the list of protocols when
// you choose the upload operation. Call it, 'BGFTYmdm'.
// Upload file name: Enter, BGFTUYTL. This will be the compiled script.
// Download file name: For this example, leave it blank.
// BAT or Script: Choose 'Script' since BGFTUYTL.SLT is a script.
// DL name: Choose 'N' for no since the Ymodem Batch protocol provides the
// correct filenames.
// ESC out of the screen and save the set up to disk by hitting 'W'. This
// get you back into Telix terminal mode.
// Download as you normally would (PgDn); tell the host to send via Ymodem
// Batch.
// Choose the BGFTYmdm protocol using arrows plus an ENTER or by the Key
// defined above.
// When Telix asks the files to upload, answer '*.*'. This will satisfy
// Telix if it has anything in its upload directory. It will actually
// be the contents of the file buffer, which are marked for upload,
// that gets uploaded.
// The script will give some messages, start the background transfer, and
// exit Telix. You will be at the DOS prompt.
// You should see the BGFT window indicate normal transmission.
// Now you can do your work in foreground as the file is uploaded in
// background.
// After completion you can use BGFT.EXE to move your files to some DOS
// directory. The files are ready to use.
// The batch file, BGFTDUMP.BAT, may be used to dump downloaded
// files from the file buffer to a specified directory (if none is
// specified, then the current working directory is used).
//
str command[80]; // Command string for BGFTOPT.
str temp[80]; // Temporary concatenation string.
// The command we will issue to DOS is:
// BGFTOPT /q /a /r# /b# /~3 /s
// where:
// /q - quiet mode (don't printout results)
// /a - acknowledge any error that may be present
// /r# - select port # (eg. /r1)
// /b# - select baud # (eg. /b2400)
// /~3 - select protocol 3 (Ymodem Batch upload)
// /s - start the transfer
main()
{
command = "/q"; // Start command line.
strcat(command," /a"); // Acknowledge any error.
strcat(command," /r");
itos(get_port(),temp); // Find out where we are connected.
strcat(command,temp); // Reconnect existing comm port.
strcat(command," /b");
itos(get_baud(),temp); // Find out what is the baud rate.
strcat(command,temp); // Set baud rate for resident.
//
// Ymodem Batch Upload
//
// The files to upload need be in the BGFT file buffer and in
// Telix's default upload directory. Use the 'move files' option in
// BGFT.EXE to put the files to upload on the file buffer. This is
// Ymodem Batch so that all files put on the file buffer for upload
// will be uploaded.
//
strcat(command," /~3"); // This protocol is Ymodem Batch upload.
strcat(command," /s"); // Start to send file.
prints(command); // Tell user the command string.
run("bgftopt.exe",command,2);
exittelix(0,0); // Leave Telix; don't hangup line.
} // Enjoy background Ymodem Batch upld.